/**
 * GoodsFee 业务逻辑实现类
 * @author WangXinLei
 * @date 2015-01-16
 */
package com.chnbst.bstyun.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.chnbst.bstyun.core.base.BaseService;
import com.chnbst.bstyun.core.common.helper.DaoHelper;
import com.chnbst.bstyun.model.pojo.GoodsFee;
import com.chnbst.bstyun.service.GoodsFeeService;

@Transactional
@Service
public class GoodsFeeServiceImpl extends BaseService implements GoodsFeeService{

	//命名空间
	private final static String nameSpace = "com.chnbst.bstyun.mapper.GoodsFeeMapper";

	@SuppressWarnings("unchecked")
	@Transactional(propagation=Propagation.REQUIRED,readOnly=true)
	@Override
	public List<GoodsFee> selectGrid() {
		return (List<GoodsFee>) DaoHelper.list(nameSpace, "selectGrid", null);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean insertGoodsFee(GoodsFee goodsFee) {
		return DaoHelper.insert(nameSpace, "insertGoodsFee", goodsFee);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean updateGoodsFee(GoodsFee goodsFee) {
		return DaoHelper.update(nameSpace, "updateGoodsFee", goodsFee);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=true)
	@Override
	public GoodsFee selectGoodsFeeVoInfo(String goodFeeId) {
		return (GoodsFee) DaoHelper.query(nameSpace, "selectGoodsFeeVoInfo", goodFeeId);
	}

	@SuppressWarnings("unchecked")
	@Transactional(propagation=Propagation.REQUIRED,readOnly=true)
	@Override
	public List<GoodsFee> selectGoodsFeeList() {
		return (List<GoodsFee>) DaoHelper.list(nameSpace, "selectGoodsFeeList", null);
	}
}